'''
尊重知识产权-白乐天

'''

#导入Pin模块
from machine import Pin
import time
from machine import SoftI2C
from ssd1306 import SSD1306_I2C  #I2C的oled选该方法
import ssd1306

#创建硬件I2C对象
#i2c=I2C(0,sda=Pin(19), scl=Pin(18), freq=400000)

#创建软件I2C对象
i2c = SoftI2C(sda=Pin(23), scl=Pin(18))
#创建OLED对象，OLED分辨率、I2C接口
oled = SSD1306_I2C(128, 64, i2c) 

#程序入口
if __name__=="__main__":
    oled.fill(0)  #清空屏幕
    
    
     
   
    #oled.draw_chinese('采',70,16)
    #oled.draw_chinese('蔬',90,16)
    #oled.draw_chinese('电',70,36)
    #oled.draw_chinese('脑',90,36)
    #oled.show()
    oled.draw_icon('地球仪',2,1,16,16)
    oled.draw_icon('收藏',20,1,16,16)
    oled.draw_icon('点赞',2,32,32,32)
    oled.draw_icon('火箭',36,32,32,32)
    oled.draw_icon('发财',70,32,32,32)
    
    oled.draw_icon('采',2,16,12,12)
    oled.draw_icon('蔬',16,16,12,12)
    oled.draw_icon('电',30,16,12,12)
    oled.draw_icon('脑',44,16,12,12)
    oled.show()
    

   
   
    
    
     #执行显示
    
   
   

    
   
  